"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t展开'}),o.on("click",function(){var e=o.data("content");e&&o.html(e),$(this).find("a.expand").hide()})})}function handleTouchToggle(e){var t,o,n,r,i=10,a=$(e);return a.on("touchstart",function(e){t=e.changedTouches[0].pageX,o=e.changedTouches[0].pageY}),a.on("touchmove",function(e){var a=e.changedTouches[0].pageX,s=e.changedTouches[0].pageY,c=Math.abs(t-a),l=Math.abs(o-s);if(l>i){if(n=s-o<0?"down":"up",n===r)return;"down"===n&&c1&&o.each(function(e){n(t,o.eq(e))})}function o(e){return e?e.replace(/&/g,"&").replace(/"/g,""").replace(//g,">"):""}function n(t,n){var r=n.parent(),a=r.css("position"),s=n.clone().css({visibility:"hidden",height:"auto","max-height":"initial",position:"absolute",top:0,left:0}).appendTo(r.css({position:"relative"})),c=t.maxHeight||n.height(),l=!1,u=n.data(i)?n.data(i):n.html(),d=n.text(),p=e.isFunction(t.ellipsis)?t.ellipsis.apply(n):t.ellipsis,h=e.isFunction(t.always)?t.always.apply(n):t.always||"",f=o(d)+p+h,g=f.length,m=g,v=Math.floor(g/2),w=s.html(f).height(),y=s.css("font-size");if(!t.maxHeight){var _=s.css("line-height");_=_.match(/px/)?parseInt(_.replace("px",""),10):_.match(/^\d+$/)?parseInt(y.replace("px",""),10)*parseInt(_,10):1.5*parseInt(y.replace("px",""),10),c=_*t.maxLine}if(c>=w)return n.html(u+h),s.remove(),void r.css({position:a});for(;;){if(w>c)m-=v,l=!0;else{if(v<=1&&l)break;m+=v,l=!1}v>1&&(v=Math.floor(v/2)),m=Math.min(u.length,m),f=o(d.substring(0,m))+p+h,w=s.html(f).height()}n.data(i)||n.data(i,n.html()),n.html(f),s.remove(),r.css({position:a})}var r=window.dui||{},i="content",a={dom:"",maxLine:3,maxHeight:null,ellipsis:"...",always:null};r.ellipsis=t,window.dui=r}(Zepto),function(){function e(t,o){Object.keys(o).forEach(function(n){var r=o[n];t[n]=r,e.prefixes.forEach(function(e){var o=e+n[0].toUpperCase()+n.substring(1);t[o]=r})})}function t(e){for(var t in e)"constructor"!==t&&"function"==typeof e[t]&&!function(){var o=e[t];e[t]=function(){try{for(var e=arguments.length,t=Array(e),n=0;n=0&&get_cookie("ck")&&t({url:"https://m.douban.com/pwa/offline",dataType:"html",extra:{timeout:1e4,error:function(e){return console.error(e)}}})}catch(e){window.console&&console.warn&&console.warn(e)}}e.prefixes=["webkit","moz","ms"];var n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,t),this.options=null,this._root=null,this._hideY=window.innerHeight+100,this.options=_extends({id:"login-promotion-dialog",className:"login-promotion-dialog",loginUrl:"",registerUrl:"",openAppUrl:""},e)}return _createClass(t,[{key:"_renderDelIcon",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.className,o=void 0===t?"":t;return"\n\n\n\n \n \n \n\n'}},{key:"_initDom",value:function(){var t=this,o=document.getElementById(this.options.id);if(!o){o=document.createElement("div"),o.id=this.options.id,o.className=this.options.className,o.innerHTML='\n
\n
\n
\n '+this._renderDelIcon({className:"del"})+"\n

继续操作需要登录豆瓣账号

\n 登录\n 打开 App\n
\n
\n ',document.body.appendChild(o);var n=function(e){e.stopPropagation()},r=function(e){n(e),t.hide()},i=o.querySelector(".mask");i.addEventListener("click",r),i.addEventListener("touchmove",n),o.querySelector(".dialog").addEventListener("click",n),o.querySelector(".del").addEventListener("click",r),e(this.getWrapper().style,{transform:"translateY("+this._hideY+"px)"}),this.getWrapper().classList.add("anim"),this._root=o}return o}},{key:"getRoot",value:function(){return this._initDom()}},{key:"getWrapper",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getRoot();return e.querySelector(".dialog-wrapper")}},{key:"show",value:function(){var t=this.getRoot();t.style.display="block";var o=this.getWrapper(),n=o.clientHeight;e(o.style,{transform:"translateY("+(window.innerHeight/2-n/2)+"px)"})}},{key:"hide",value:function(){var t=this;e(this.getWrapper().style,{transform:"translateY("+this._hideY+"px)"}),setTimeout(function(){t.getRoot().style.display="none"},500)}}]),t}();window.React&&React.PropTypes||window.PropTypes;t.all=function(e,o){var n=0,r={},i=function(t,i){return["success","error","ajaxError","complete"].reduce(function(a,s){return r[s]=[],a[s]=function(){for(var a,c=arguments.length,l=Array(c),u=0;u=0&&o();try{document.domain.indexOf("pre")>=0&&(window.__ajax=t)}catch(e){}var r=window.dui||(window.dui={});if(!r.LoginUtil){var i="https://accounts.douban.com/passport/login",a="https://accounts.douban.com/register";r.LoginUtil={BASE_LOGIN_URL:i,BASE_REGISTER_URL:a,LOGIN_URL:i+"?source=mobile&redir="+encodeURIComponent(location.href),REGISTER_URL:a+"?source=mobile&redir="+encodeURIComponent(location.href),redirectToLogin:function(){location.href=this.LOGIN_URL},defaultUserInfo:{id:0,avatar:"https://img1.doubanio.com/icon/user_normal.jpg",name:"未登陆"},getUserInfo:function(e){e=e||!1;var t=window.TalionData||(window.TalionData={}),o=t.userInfo;if(o)return o;try{var n=get_cookie("talionusr");n&&(o=JSON.parse(window.atob(n)))}catch(e){console.error(e)}return e?o||this.defaultUserInfo:o},isLogin:function(){var e=this.getUserInfo();return!(!e||!e.id)},getLoginDialog:function(){if(!this._loginDialog){var e=document.querySelector(".promo_button.open_app")||document.querySelector(".open-in-app-fixed-bottom")||document.querySelector(".open-in-app-float"),t=void 0,o="card_popup_continue";e&&(t=e.href.replace(/channel=[a-zA-Z_0-9]+(&?)/,"channel="+o+"$1")),t=t||"/to_app?url="+encodeURIComponent(location.href)+"&source="+o,this._loginDialog=new n({loginUrl:this.LOGIN_URL,registerUrl:this.REGISTER_URL,openAppUrl:t})}return this._loginDialog},checkLogin:function(e){return!!this.isLogin()||(e===!0?this.redirectToLogin():this.getLoginDialog().show(),!1)}}}}(),function(e,t){function o(e,o){return"function"==typeof e&&(e={afterHide:e}),t.extend({},o,e)}var n=e.dui||(e.dui={});if(!n.toast){t('
').appendTo(document.body);var r,i={msg:"操作成功",color:"green",timeout:2e3,afterHide:null};n.toast={show:function(e){e=this._opts=t.extend({},i,e),t("#toast").removeClass("green red gray").addClass("show "+e.color).find("span").html(e.msg),r&&(clearTimeout(r),r=null),e.timeout&&(r=setTimeout(function(){this.hide()}.bind(this),e.timeout))},hide:function(){var e=this;t("#toast").removeClass("show"),setTimeout(function(){e._opts.afterHide&&e._opts.afterHide()},500)},warn:function(e,t){this.show(o(t,{msg:e||"操作失败",color:"red"}))},error:function(e,t){this.show(o(t,{msg:e||"出现错误",color:"gray"}))},success:function(e,t){this.show(o(t,{msg:e||"操作成功",color:"green"}))},networkError:function(e,t){e&&this.error(e,t)}}}}(window,Zepto),function(){function e(e,t){var o=["ref="+encodeURIComponent(location.pathname)];for(var n in t)t.hasOwnProperty(n)&&o.push(n+"="+t[n]);window._SPLITTEST&&o.push("splittest="+window._SPLITTEST),localStorage.setItem("report",(localStorage.getItem("report")||"")+"_moreurl_separator_"+o.join("&"))}var t=function(){var e;try{localStorage.setItem("test",1),localStorage.removeItem("test"),e=!0}catch(t){e=!1}return e}();return t?($(window).one("load",function(){var e=localStorage.getItem("report");if(e){e=e.split("_moreurl_separator_");var t=function t(o){return""==o?void t(e.shift()):void $.get("undefined"==typeof _MOREURL_REQ?"/stat.html?"+o:_MOREURL_REQ+"?"+o,function(){return e.length?(t(e.shift()),void localStorage.setItem("report",e.join("_moreurl_separator_"))):void localStorage.removeItem("report")})};t(e.shift())}}),window.moreurl=e,void $(document).click(function(t){var o=t.target,n=$(o).data("moreurl-dict");n&&e(o,n)})):void(window.moreurl=function(){})}(),Array.from=Array.from||function(e){for(var t=[],o=0;o